///////////////////////////////////////////////////////////////////////////////
//
//  Copyright (C) 2007-2009 ILOG, S.A.
//  All Rights Reserved.
//  The following is ILOG Source Code.  No modifications may be made to the  
//  ILOG Source Code.  Any usage of the ILOG Source Code is subject to 
//  the terms and conditions of the ILOG End User License Agreement   
//  applicable to this ILOG software product.
//
///////////////////////////////////////////////////////////////////////////////

package ilog.gauges.gaugesClasses.circular
{
  import ilog.gauges.gaugesClasses.IScale;

  /**
   * The <code>ICircularScale</code> interface extends the <code>IScale</code>
   * interface for circular scales.
   *  
   * @see ilog.gauges.circular.CircularGauge
   */  
  public interface ICircularScale extends IScale
  {
    /**
     * The start angle of the scale, in degrees.
     * 
     * @default 210 
     */  
    function get startAngle():Number;

    /**
     * @private 
     */  
    function set startAngle(value:Number):void;

    /**
     * The end angle of the scale, in degrees.
     *  
     * @default 330
     */  
    function get endAngle():Number;

    /**
     * @private 
     */  
    function set endAngle(value:Number):void;
    
    /**
     * The orientation of the scale. It can be clockwise (<code>"clockwise"</code>)
     * or counterclockwise (<code>"cclockwise"</code>). 
     * 
     * @default "clockwise"
     */  
    function get orientation():String;

    /**
     * @private
     */  
    function set orientation(value:String):void;
    
    /**
     * Transforms a value into an angle according to <code>startAngle</code>, <code>endAngle</code>, and <code>orientation</code> values.
     * @param value A data value to compute the corresponding angle. It is commonly a Number or a String.
     * 
     * @return The corresponding angle, in radians, in the interval [0, 2*Math.PI] or <code>startAngle</code> if the value is null or NaN.
     * 
     */  
    function angleForValue(value:Object):Number;

    /**
     * Transforms an angle into a value according to <code>startAngle</code>, <code>endAngle</code>, and <code>orientation</code> values.
     * 
     * @param angle An angle to compute the corresponding value.
     * 
     * @return The corresponding value. 
     */  
    function valueForAngle(angle:Number):Object;

    /**
     * This function returns <code>true</code> if the angle parameter
     * is between <code>startAngle</code> and <code>endAngle</code>, and according to the <code>orientation</code> property.
     * 
     * @param angle An angle
     * 
     * @return <code>true</code> if the angle is in the scale interval.  
     */  
    function angleInRange(angle:Number):Boolean;
  }
}
